﻿<UserControl x:Class="Tanmia.Warehouse.Presentation.Scenarios.UnitEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:basis="clr-namespace:Tanmia.Basis.WPF.Controls;assembly=Tanmia.Basis"
             mc:Ignorable="d" Height="90" d:DesignWidth="400">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/Tanmia.Basis;component/WPF/TanmiaControlsStyle.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="80" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>

        <Label Content="{basis:Labeler Path=Entity.UnitID}" Grid.Column="0" Grid.Row="0" />
        <TextBox Text="{Binding Path=Entity.UnitID, NotifyOnValidationError=True, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="0" IsReadOnly="True" />

        <Label Content="{basis:Labeler Path=Entity.UnitName}" Grid.Column="0" Grid.Row="1" />
        <TextBox Text="{Binding Path=Entity.UnitName, NotifyOnValidationError=True, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="1" />

        <Label Content="{basis:Labeler Path=Entity.Abbreviation}" Grid.Column="0" Grid.Row="2" />
        <TextBox Text="{Binding Path=Entity.Abbreviation, NotifyOnValidationError=True, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="2" />
    </Grid>
</UserControl>
